package com.tour.tour.service;

import com.tour.tour.common.Response;
import com.tour.tour.dto.CommentDTO;
import com.tour.tour.entity.PostInfo;
import com.tour.tour.exception.UserStatusException;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author 76004
 * @apiNote 帖子
 * @date 2023/4/25 8:15
 */
public interface PostService {
    public Response<Void> addPost(PostInfo postInfo, HttpServletRequest httpServletRequest) throws UserStatusException;

    public Response<List<PostInfo>> selectPostInfoPage(Integer pageSize, Integer pageNum);

    public Response<List<PostInfo>> selectPostInfoByUsername(String username, Integer pageSize, Integer pageNum);

    public Response<PostInfo> selectPost(Long id);

    public Response<Void> deletePost(Long id);

    public Response<Void> updatePost(PostInfo postInfo);

    public Response<Void> comment(CommentDTO commentDTO, HttpServletRequest httpServletRequest) throws UserStatusException;

}
